package com.zmn.plat.dubbo.interfaces.push;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;

import com.zmn.common.dto.ResponseDTO;
import com.zmn.common.dto.ResultDTO;
import com.zmn.common.dto.push.inner.InnerDTO;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

/**
 * 站内信读取远程服务
 *
 * @author duanzuocai
 * @version v1.0
 * @since 2019/1/3 10:08
 */
@Api(value = "站内信读取远程服务", tags = {"站内信"})
public interface InnerRemoteService {

    /**
     * 读取一条站内信
     *
     * @param staffId
     * @return
     */
    @ApiOperation(value = "站内信读取远程服务", response = ResultDTO.class, notes = "", tags = {"站内信"})
    ResponseDTO<InnerDTO> getOneInnerMsg(@NotNull(message = "staffId不能为空") @Positive(message = "staffId必须为大于0的正整数") @ApiParam(value = "员工ID", required = true) Integer staffId);

    /**
     * 分页查询站内信
     *
     * @param staffId
     *            员工ID
     * @param status
     *            状态：1、未读取，2已读取，Null 或者 0 全部都查询
     * @param pageIndex
     *            第几页
     * @param pageSize
     *            每页大小
     * @return
     */
    @ApiOperation(value = "分页查询站内信", response = ResultDTO.class, notes = "", tags = {"站内信"})
    ResponseDTO<InnerDTO> listPageInnerMsg(@Positive(message = "staffId必须为大于0的正整数") @ApiParam(value = "员工ID", required = true) Integer staffId,
        @Positive(message = "status必须为大于0的正整数") @ApiParam(value = "状态", required = true) Integer status,
        @Positive(message = "pageIndex必须为大于0的正整数") @ApiParam(value = "第几页", required = true) Integer pageIndex,
        @Positive(message = "pageSize必须为大于0的正整数") @ApiParam(value = "每页大小", required = true) Integer pageSize);

    /**
     * 修改一条站内信为已读
     *
     * @param innerId
     * @return
     */
    @ApiOperation(value = "修改一条站内信为已读", response = Boolean.class, notes = "", tags = {"站内信"})
    boolean readOneInnerMsg(@NotNull(message = "innerId不能为空") @Positive(message = "innerId必须为大于0的正整数") @ApiParam(value = "站内信ID", required = true) Integer innerId);

    /**
     * 读取并修改站内信为已读
     *
     * @param staffId
     * @return
     */
    @ApiOperation(value = "读取并修改站内信为已读", response = ResponseDTO.class, notes = "", tags = {"站内信"})
    ResponseDTO<InnerDTO> getReadOneInnerMsg(@NotNull(message = "staffId不能为空") @Positive(message = "staffId必须为大于0的正整数") @ApiParam(value = "员工ID", required = true) Integer staffId);

}
